import { Column, Entity, Index, PrimaryGeneratedColumn } from "typeorm";

@Index("dictionary_item_pkey", ["id"], { unique: true })
@Entity("dictionary_item", { schema: "public" })
export class DictionaryItem {
  @PrimaryGeneratedColumn({ type: "integer", name: "id" })
  id: number;

  @Column("character varying", {
    name: "name",
    length: 30,
    default: () => "''",
  })
  name: string;

  @Column("character varying", {
    name: "code",
    length: 20,
    default: () => "''",
  })
  code: string;

  @Column("integer", { name: "parent_id", default: () => "0" })
  parentId: number;

  @Column("smallint", { name: "category_id", default: () => "0" })
  categoryId: number;
}
